package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	m := make(map[string]interface{}, 4)
	m["company"] = "AB"
	m["sub"] = []string{"A", "B"}
	m["isok"] = false
	m["price"] = 1.1
	// 使用map 键可以为小写
	res, _ := json.Marshal(m)
	fmt.Println(string(res)) // {"company":"AB","isok":false,"price":1.1,"sub":["A","B"]}
}
